package ils.web.results;

import java.io.PrintWriter;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Result;

public class AjaxResult implements Result
{

    @Override
    public void execute(ActionInvocation invocation) throws Exception
    {
        ServletActionContext.getResponse().setContentType("text/plain");
        PrintWriter responseStream = ServletActionContext.getResponse().getWriter();
        String msg = (String)invocation.getStack().findValue("msg");
        responseStream.println(msg);
    }

}
